home *** CD-ROM | disk | FTP | other *** search
- global gOBJECTSA, void, gCursorlist, sQTCharSprite, gStates, gQTmovPath, cNUllCharmovie
-
- on EnterA08
- if (getaProp(getaProp(gObjects, #Butter08Par), #State) = #NoShow) and (getaProp(getaProp(gStates, #Conditions), #Trailer) = #true) then
- MakeDynamic(#Butter08Par, #State, #Show)
- end if
- DoRadioChannel()
- end
-
- on ExitA08
- if getaProp(getaProp(gObjects, #Butter08Par), #State) = #Show then
- ChangeSpecialState(#Butter08Par, #Shown)
- end if
- end
-
- on EnterA09Phone
- set OBj to getaProp(gObjects, #TVPhoneOBJ)
- set movObj to getaProp(gObjects, #tvQTmovie)
- if (getaProp(getaProp(gObjects, #ClockDrawer), #solved) <> #true) or (getaProp(getaProp(gObjects, #JuliaPaint), #solved) <> #true) then
- if voidp(getaProp(getaProp(gStates, #BeenThere), #A09)) then
- MakeDynamic(#TVPhoneOBJ, #DisplayState, #off)
- MakeDynamic(#tvQTmovie, #DisplayState, #OffScreen)
- Startthetimer(1, "ringPhone")
- end if
- else
- MakeDynamic(#TVPhoneOBJ, #DisplayState, #off)
- MakeDynamic(#tvQTmovie, #DisplayState, #OffScreen)
- end if
- if (getaProp(getaProp(gStates, #Conditions), #Trailer) = #true) and (getaProp(getaProp(gObjects, #TVPhoneOBJ), #CredPlay) = #true) then
- PDARelease("J04m02c.mov")
- end if
- end
-
- on enterA31A
- preLoadCast(the number of cast "A31crkl.aif")
- end
-
- on ringPhone
- playSound("A09RING.AIF", #cast, #true)
- stopsound("A09RING.AIF")
- MakeDynamic(#TVPhoneOBJ, #DisplayState, #ProspScram)
- MakeDynamic(#tvQTmovie, #DisplayState, #ProspScram)
- MakeDynamic(#TVorPhonetoggle, #DisplayState, #Phone)
- set OBj to getaProp(gObjects, #TvPlayToggle)
- set the castNum of sprite getaProp(OBj, #SpriteNum) to getaProp(getaProp(OBj, #cast), #play)
- updateStage()
- end
-
- on CleanScreenTVPhone
- PauseMovieTVPhone()
- ClearMessageButtons()
- set OBj to getaProp(gObjects, #TVPhoneOBJ)
- set movObj to getaProp(gObjects, #tvQTmovie)
- MakeDynamic(#TVPhoneOBJ, #DisplayState, #off)
- MakeDynamic(#tvQTmovie, #DisplayState, #OffScreen)
- set the castNum of sprite getaProp(OBj, #SpriteNum) to getaProp(getaProp(OBj, #cast), #off)
- set the loc of sprite getaProp(movObj, #SpriteNum) to point(-2000, -2000)
- updateStage()
- end
-
- on ExitA09Phone
- set OBj to getaProp(gObjects, #TVPhoneOBJ)
- MakeDynamic(#TvPlayToggle, #State, #pause)
- MakeDynamic(#TvPlayToggle, #DisplayState, #pause)
- CleanScreenTVPhone()
- end
-
- on ClearMessageButtons
- DelObjects([#Messrect1, #Messrect2])
- end
-
- on MessagesNew mNum
- set OBj to getaProp(gObjects, #TVPhoneOBJ)
- set the castNum of sprite getaProp(OBj, #SpriteNum) to getaProp(getaProp(getaProp(OBj, #cast), #Message), mNum)
- MakeDynamic(#TVPhoneOBJ, #MessCondition, mNum)
- end
-
- on DoTvSavebutton
- CleanScreenTVPhone()
- if getaProp(getaProp(gObjects, #TVPhoneOBJ), #solved) = #true then
- MessagesNew(#S2)
- AddObjects([#Messrect1, #Messrect2])
- else
- MessagesNew(#S1)
- AddObjects([#Messrect1])
- end if
- end
-
- on DoTvNewbutton
- CleanScreenTVPhone()
- if (getaProp(getaProp(gObjects, #ClockDrawer), #solved) = #true) and (getaProp(getaProp(gObjects, #JuliaPaint), #solved) = #true) then
- if getaProp(getaProp(gObjects, #TVPhoneOBJ), #solved) = #true then
- MessagesNew(#N3)
- else
- if getaProp(getaProp(gObjects, #TVPhoneOBJ), #solved) <> #true then
- MessagesNew(#N2)
- AddObjects([#Messrect1])
- end if
- end if
- else
- if (getaProp(getaProp(gObjects, #JuliaPaint), #solved) = #false) and (getaProp(getaProp(gObjects, #ClockDrawer), #solved) = #false) then
- MessagesNew(#N1)
- AddObjects([#Messrect1])
- else
- if getaProp(getaProp(gObjects, #ClockDrawer), #solved) = #true then
- MessagesNew(#N4)
- AddObjects([#Messrect1])
- end if
- end if
- end if
- end
-
- on PlayaMessage RectNum
- set OBj to getaProp(gObjects, #TVPhoneOBJ)
- set movObj to getaProp(gObjects, #tvQTmovie)
- ClearMessageButtons()
- if (getaProp(OBj, #MessCondition) = #S1) and (RectNum = 1) then
- ReadyVideoChannel(#Agent)
- setaProp(getaProp(gObjects, #TVPhoneOBJ), #CredPlay, #true)
- else
- if (getaProp(OBj, #MessCondition) = #S2) and (RectNum = 1) then
- ReadyVideoChannel(#Agent)
- setaProp(getaProp(gObjects, #TVPhoneOBJ), #CredPlay, #true)
- else
- if (getaProp(OBj, #MessCondition) = #S2) and (RectNum = 2) then
- ReadyVideoChannel(#ProspSolve)
- else
- if getaProp(OBj, #MessCondition) = #N2 then
- ReadyVideoChannel(#ProspSolve)
- setaProp(OBj, #solved, #true)
- else
- if (getaProp(OBj, #MessCondition) = #N1) or (getaProp(OBj, #MessCondition) = #N4) then
- ReadyVideoChannel(#ProspScram)
- end if
- end if
- end if
- end if
- end if
- DoTvPlayToggle(#play)
- end
-
- on doDownLoadNow
- set MovNAme to getaProp(getaProp(gObjects, #tvQTmovie), #DisplayState)
- PauseMovieTVPhone()
- set PDA to getaProp(gObjects, #PDAOBJ)
- set TV to getaProp(gObjects, #TVPhoneOBJ)
- if getaProp(PDA, #Aquired) = #false then
- set the castNum of sprite getaProp(TV, #SpriteNum) to getaProp(getaProp(getaProp(TV, #cast), #DownLoad), #NoPDA)
- playSound("A09dnlod.aif", #cast, #NOW)
- else
- if ((MovNAme = #TV4) or (MovNAme = #ProspSolve)) and (the Trailer of the Conditions of gStates <> #true) then
- set the castNum of sprite getaProp(PDA, #SpriteNum) to getaProp(getaProp(PDA, #cast), #PDA)
- set the loc of sprite getaProp(PDA, #SpriteNum) to getaProp(PDA, #PDALOC)
- set the castNum of sprite getaProp(TV, #SpriteNum) to getaProp(getaProp(getaProp(TV, #cast), #DownLoad), #load)
- updateStage()
- playSound("A09dnlod.aif", #cast, 1)
- if MovNAme = #TV4 then
- PDARelease(#DocSeries)
- PDARelease("J05trail.mov")
- else
- if MovNAme = #ProspSolve then
- PDARelease(#ProsProSeries)
- end if
- end if
- repeat while soundBusy(1)
- nothing()
- end repeat
- set the castNum of sprite getaProp(PDA, #SpriteNum) to getaProp(getaProp(PDA, #cast), #UP)
- set the loc of sprite getaProp(PDA, #SpriteNum) to getaProp(PDA, #loc)
- set the castNum of sprite getaProp(TV, #SpriteNum) to getaProp(getaProp(TV, #cast), #off)
- updateStage()
- else
- set the castNum of sprite getaProp(TV, #SpriteNum) to getaProp(getaProp(getaProp(TV, #cast), #DownLoad), #NoMes)
- playSound("A09dnlod.aif", #cast, #NOW)
- end if
- end if
- end
-
- on TurnOnPHONE
- AnimateDial()
- end
-
- on TurnOffPHONE
- AnimateDial()
- AnimateDial()
- end
-
- on AnimateDial
- set OBj to getaProp(gObjects, #tvRoto)
- repeat with cnum in getaProp(getaProp(OBj, #cast), #Dial)
- set the castNum of sprite getaProp(OBj, #SpriteNum) to cnum
- CursorandUpdate()
- end repeat
- end
-
- on AnimateChannels type
- set nChild to count(getaProp(getaProp(gObjects, #TvChanChange), #Children))
- if type = #UP then
- repeat with X = 1 to nChild
- set onChild to getAt(getaProp(getaProp(gObjects, #TvChanChange), #Children), X)
- set the castNum of sprite getaProp(getaProp(gObjects, onChild), #SpriteNum) to getaProp(getaProp(getaProp(gObjects, onChild), #cast), #on)
- CursorandUpdate()
- set the castNum of sprite getaProp(getaProp(gObjects, onChild), #SpriteNum) to getaProp(getaProp(getaProp(gObjects, onChild), #cast), #off)
- end repeat
- else
- if type = #down then
- repeat with X = nChild down to 1
- set onChild to getAt(getaProp(getaProp(gObjects, #TvChanChange), #Children), X)
- set the castNum of sprite getaProp(getaProp(gObjects, onChild), #SpriteNum) to getaProp(getaProp(getaProp(gObjects, onChild), #cast), #on)
- CursorandUpdate()
- set the castNum of sprite getaProp(getaProp(gObjects, onChild), #SpriteNum) to getaProp(getaProp(getaProp(gObjects, onChild), #cast), #off)
- end repeat
- else
- if type = #random then
- set templist to []
- repeat with X = 1 to nChild
- add(templist, X)
- end repeat
- repeat with X = 1 to nChild
- set Y to random(count(templist))
- set You to getAt(templist, Y)
- deleteAt(templist, Y)
- set onChild to getAt(getaProp(getaProp(gObjects, #TvChanChange), #Children), You)
- set the castNum of sprite getaProp(getaProp(gObjects, onChild), #SpriteNum) to getaProp(getaProp(getaProp(gObjects, onChild), #cast), #on)
- CursorandUpdate()
- set the castNum of sprite getaProp(getaProp(gObjects, onChild), #SpriteNum) to getaProp(getaProp(getaProp(gObjects, onChild), #cast), #off)
- end repeat
- end if
- end if
- end if
- end
-
- on TurnOnTV
- set aOBJ to getaProp(gObjects, #TVPhoneOBJ)
- set OBj to getaProp(gObjects, #TvChanChange)
- set qtOBj to getaProp(gObjects, #tvQTmovie)
- AnimateChannels(#random)
- set Channelon to getaProp(getaProp(OBj, #Children), getaProp(OBj, #Channel))
- set the castNum of sprite getaProp(getaProp(gObjects, Channelon), #SpriteNum) to getaProp(getaProp(getaProp(gObjects, Channelon), #cast), #on)
- set ChanNum to value("#" & "TV" & getaProp(OBj, #Channel))
- ReadyVideoChannel(ChanNum)
- end
-
- on ReadyVideoChannel ChanNum, movieRate
- set aOBJ to getaProp(gObjects, #TVPhoneOBJ)
- set qtOBj to getaProp(gObjects, #tvQTmovie)
- set the castNum of sprite getaProp(aOBJ, #SpriteNum) to getaProp(getaProp(aOBJ, #cast), ChanNum)
- MakeDynamic(#tvQTmovie, #DisplayState, ChanNum)
- set the movieTime of sprite sQTCharSprite to 0
- PlayMovieTvPhone()
- end
-
- on TurnOFFTV
- set aOBJ to getaProp(gObjects, #TVPhoneOBJ)
- set OBj to getaProp(gObjects, #TvChanChange)
- AnimateChannels(#random)
- MakeDynamic(#TvChanChange, #Channel, 1)
- end
-
- on SwitchTVPhone
- set OBj to getaProp(gObjects, #TVorPhonetoggle)
- set ParObj to getaProp(gObjects, getaProp(OBj, #Parent))
- if getaProp(OBj, #State) = #Phone then
- CleanScreenTVPhone()
- TurnOFFTV()
- ChangeSpecialState(getaProp(OBj, #Parent), getaProp(OBj, #State))
- TurnOnPHONE()
- else
- if getaProp(OBj, #State) = #TV then
- CleanScreenTVPhone()
- TurnOffPHONE()
- ChangeSpecialState(getaProp(OBj, #Parent), getaProp(OBj, #State))
- TurnOnTV()
- end if
- end if
- MakeDynamic(#TVorPhonetoggle, #DisplayState, getaProp(OBj, #State))
- end
-
- on DoTvPlayToggle Action
- set qtOBj to getaProp(gObjects, #tvQTmovie)
- if getaProp(qtOBj, #DisplayState) <> #OffScreen then
- set OBj to getaProp(gObjects, #TvPlayToggle)
- set qtOBj to getaProp(gObjects, #tvQTmovie)
- updateStage()
- if Action = #pause then
- PauseMovieTVPhone()
- else
- if Action = #play then
- PlayMovieTvPhone()
- else
- if Action = #Rew then
- RewMovieTVPhone()
- end if
- end if
- end if
- end if
- end
-
- on PauseMovieTVPhone
- set OBj to getaProp(gObjects, #TvPlayToggle)
- if getaProp(getaProp(OBj, #cast), #pause) <> the castNum of sprite getaProp(OBj, #SpriteNum) then
- set qtOBj to getaProp(gObjects, #tvQTmovie)
- set the castNum of sprite getaProp(OBj, #SpriteNum) to getaProp(getaProp(OBj, #cast), #pause)
- updateStage()
- set qtOBj to getaProp(gObjects, #tvQTmovie)
- set the movieRate of sprite getaProp(qtOBj, #SpriteNum) to 0
- updateStage()
- playSound(getaProp(getaProp(getaProp(gObjects, #TvPlayToggle), #sound), #pause), #keyframeCast, 1)
- CursorandUpdate()
- end if
- end
-
- on PlayMovieTvPhone
- set OBj to getaProp(gObjects, #TvPlayToggle)
- set qtOBj to getaProp(gObjects, #tvQTmovie)
- set the castNum of sprite getaProp(OBj, #SpriteNum) to getaProp(getaProp(OBj, #cast), #play)
- updateStage()
- PlayMovieCharPhone()
- end
-
- on PlayMovieCharPhone
- set qtOBj to getaProp(gObjects, #tvQTmovie)
- playSound(getaProp(getaProp(getaProp(gObjects, #TvPlayToggle), #sound), #play), #keyframeCast, 1)
- set aname to getAt(getaProp(getaProp(qtOBj, #cast), getaProp(qtOBj, #DisplayState)), 1)
- if the fileName of cast cNUllCharmovie <> string(gQTmovPath & aname) then
- set the fileName of cast cNUllCharmovie to string(gQTmovPath & aname)
- end if
- updateStage()
- stopsound(#ALL)
- set the loc of sprite sQTCharSprite to getaProp(qtOBj, #loc)
- set the movieRate of sprite sQTCharSprite to 1
- updateStage()
- end
-
- on RewMovieTVPhone
- set qtOBj to getaProp(gObjects, #tvQTmovie)
- set OBj to getaProp(gObjects, #TvPlayToggle)
- set the castNum of sprite getaProp(OBj, #SpriteNum) to getaProp(getaProp(OBj, #cast), #Rew)
- updateStage()
- playSound(getaProp(getaProp(getaProp(gObjects, #TvPlayToggle), #sound), #Rew), #keyframeCast, #NOW)
- set the movieRate of sprite sQTCharSprite to -5
- repeat while soundBusy(1)
- CursorandUpdate()
- end repeat
- set the movieRate of sprite sQTCharSprite to 0
- set the movieTime of sprite sQTCharSprite to 0
- CursorandUpdate()
- set the castNum of sprite getaProp(OBj, #SpriteNum) to getaProp(getaProp(OBj, #cast), #pause)
- MakeDynamic(#TvPlayToggle, #State, #pause)
- MakeDynamic(#TvPlayToggle, #DisplayState, #pause)
- CursorandUpdate()
- end
-
- on DotvRoto
- set OBj to getaProp(gObjects, #tvRoto)
- CleanScreenTVPhone()
- AnimateDial()
- set ran to random(count(getaProp(getaProp(OBj, #sound), #ran)))
- playSound(getAt(getaProp(getaProp(OBj, #sound), #ran), ran), #keyframeCast, #NOW)
- end
-
- on DoTvChanChange
- set OBj to getaProp(gObjects, #TvChanChange)
- CleanScreenTVPhone()
- set curChn to getaProp(OBj, #Channel)
- set nextChn to curChn + 1
- if nextChn > count(getaProp(OBj, #Children)) then
- set nextChn to 1
- end if
- set curOBj to getaProp(gObjects, getAt(getaProp(OBj, #Children), curChn))
- set nextOBj to getaProp(gObjects, getAt(getaProp(OBj, #Children), nextChn))
- set the castNum of sprite getaProp(curOBj, #SpriteNum) to getaProp(getaProp(curOBj, #cast), #off)
- set the castNum of sprite getaProp(nextOBj, #SpriteNum) to getaProp(getaProp(nextOBj, #cast), #on)
- MakeDynamic(#TvChanChange, #Channel, nextChn)
- ReadyVideoChannel(value("#" & "TV" & nextChn), 1)
- end
-
- on GrabPDAJump
- playSound("A31crkl.aif", #cast, 1)
- Jumptokey(#A31B)
- end
-